package cn.theten52.demo.patterns.design.creation.builder;

/**
 * 车辆生产的Director
 *
 * @author wangjin
 * @date 2020/12/29
 */
public class VehicleMaker {
    private VehicleBuilder builder;

    public void setBuilder(VehicleBuilder builder) {
        this.builder = builder;
    }

    public void construct() {
        builder.initialize();
        builder.addWheels();
        builder.addLights();
    }

    public Vehicle getVehicle() {
        return builder.getVehicle();
    }
}
